<template>
  <div>
    <Footer />
    <div class="ss">
      <HomeTop />
      <Search />
      <Banner />
      <Nav />
      <Content />
    </div>
  </div>
</template>
../components/homePage/htop.vue
<script>
import HomeTop from "../components/homePage/htop.vue";
import Search from "../components/homePage/search.vue";
import Banner from "../components/homePage/banner.vue";
import Nav from "../components/homePage/nav.vue";
import Content from "../components/homePage/content.vue";
export default {
  components: {
    HomeTop,
    Search,
    Banner,
    Nav,
    Content,
  },
  beforeRouteEnter(to, from, next) {
    next();
  },
  beforeRouteLeave(to, from, next) {
    if (confirm("确定要离开")) {
      next();
    } else {
      next(false);
    }
  },
};
</script>

<style scoped>
.ss {
  margin-bottom: 0.6rem;
}
</style>